Ext.application({
    name: 'Sencha',

    launch: function() {
        Ext.create('Ext.TabPanel', {
            fullscreen: true,
            tabBarPosition: 'bottom',
            layout: {
                type: 'card',
                animation: {
                    type: 'fade'
                }
            },
            items: [
                {
                    xtype: 'toolbar',
                    docked: 'top',
                    title: 'BauPro - Tagebuch'
                },
                {
                    title: 'Home',
                    iconCls: 'home',
                    cls: 'home',
                    html: [
                        '<br /><br /><br /><br />',
                        '<img src="images/Logo.png" width="50%" />',
                        '<br /><h1>BauPro - Tagebuch</h1>',
                        '<p>Das Bautagebuch für Ihre Projekte</p>'
                    ].join("")
                },
                {
                    xtype: 'list',
                    title: 'Projekte',
                    iconCls: 'bookmarks',
                    itemTpl: '{project}',
                    store: {
                       fields: ['project'],
                       data: [
                           {project: 'Freilassing'},
                           {project: 'Mainz'},
                           {project: 'Rüsselsheim'},
                           {project: 'Oberhausen'}
                       ]
                    }
                },
                {
                    xtype: 'list',
                    title: 'Firmen',
                    iconCls: 'team',
                    itemTpl: '{company}',
                    store: {
                        fields: ['company'],
                        data: [
                            {company: 'JUWI Solar GmbH'},
                            {company: 'Goldbeck Solar GmbH'},
                            {company: 'KKS GmbH'}
                        ]
                    }
                },
                {
                    title: 'Einstellungen',
                    iconCls: 'settings'
                },
                {
                    title: 'Info',
                    iconCls: 'info',
                    cls: 'home',
                    html: [
                        '<br /><img src="images/Logo.png" width="30%" />',
                        '<h1> BauPro - Tagebuch</h1>',
                        '<p>WebApp-Entwicklung für iOS & Android</p>',
                        '<p>Entwickler:<br />IT-Service Zwicker<br />Simon Zwicker<br />Richard-Wagner-Str. 60',
                        '<br />67304 Eisenberg<br />Tel.: 06351 399668<br />Mobil: 0151 54692447</p>'
                    ].join("")
                }
            ]
        });
    }
});